package com.itheima.test;

import java.util.ArrayList;

public class StudentTest1 implements StudentService {

    @Override
    public void printAllInfo(ArrayList<Student> students) {
        System.out.println("----------全班全部学生信息如下--------------");
        for (int i = 0; i < students.size(); i++) {
            Student e=students.get(i);
            e.toString();

        }
        System.out.println("-----------------------------------------");

    }

    @Override
    public void printAverageScore(ArrayList<Student> students) {
       double allScore=0.0;
        for (int i = 0; i < students.size(); i++) {
            allScore+=students.get(i).getScore();

        }
        System.out.println("平均分为："+allScore/students.size());

    }
}
